package com.javacoo.xservice.base.support.expression.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * SPEL表达式解析器配置
 * <p>
 * 说明:
 * </p>
 * <li>对应application-*.properties中app.config.spel</li>
 *
 * @author DuanYong
 * @since 2017年7月28日上午9:23:26
 */
@Configuration
@ConfigurationProperties(prefix = SpelConfig.PREFIX)
@ConditionalOnProperty(prefix = SpelConfig.PREFIX, value = SpelConfig.ENABLED, matchIfMissing = true)
public class SpelConfig {
    public static final String PREFIX = "app.config.spel";
    /** 默认实现:,默认值*/
    public static final String DEFAULT_IMPL= "default";
    public static final String ENABLED = "enabled";

    /**日志保留天数*/
    private String impl = DEFAULT_IMPL;
    /**是否可用*/
    private String enabled = ENABLED;

    public String getImpl() {
        return impl;
    }

    public void setImpl(String impl) {
        this.impl = impl;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }
}
